package com.baizhi.cmfz.appcontroller;

import com.baizhi.cmfz.entity.Banner;
import com.baizhi.cmfz.service.BannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("banner")
public class AppBannerController {
    @Autowired
    private BannerService bannerService;
    @GetMapping("selectBannerByCount/{count}")
    public List<Banner> selectBannerByCount(@PathVariable("count") int count) {
        return bannerService.selectBannerByCount(count);
    }
}
